<template>
  <div>
    <to-search></to-search>
    <img :src="require('../../assets/img/1.jpg')" alt="">//

    <!-- 2.通过import引入图片，data中声明，页面使用  -->
    <img :src="img1" alt="">
      <!-- 当背景图不推荐
    <div class="block" :style="{ background: `url(${require('../../assets/img/1.jpeg')}) 0 0 no-repeat`}"></div> -->
  </div>
</template>

<script>
export default {
data(){
    return{
        img1:img1
    }
}
}
</script>

<style lang="less" scoped>
@import "../../less/index.less";
img{
    width: 1rem;
    height: 1rem;
}
</style>>
